//
//@File    :	5.6_forstr1.cpp
//@Time    :	2021/08/04 18:04:10
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using for with a string
//

#include <string>
#include <iostream>

using namespace std;
int main()
{
    cout<<"Enter a word: ";
    string word;
    cin>>word;

    for (int i = word.size() - 1; i >= 0; i--)
    {
        cout<<word[i];
    }
    cout<<"\nBye.\n";
    system("pause");
    return 0;
}